package com.tomorrow.runner.activity;

import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;

import com.tomorrow.runner.R;
import com.tomorrow.runner.activity.basic.BasicActivity;
import com.tomorrow.runner.activity.main.HomeActivity;

/**
 * 启动界面
 * Created by tomorrow on 16-4-20.
 */
public class LogoActivity extends BasicActivity {
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_logo);
        new Handler().postDelayed(new Runnable() {
            @Override
            public void run() {
                Intent intent = new Intent(LogoActivity.this,LoginActivity.class);
                if (mAccountService.isLogin()){
                    intent = new Intent(LogoActivity.this,HomeActivity.class);
                }
                startActivity(intent);
                getWindow().setWindowAnimations(android.R.style.Animation_Activity);
                finish();
            }
        },2000);
    }
}
